#pragma once

class IModel;

namespace EVertex
{
	enum Type
	{
		Indices			= 1 << 0,
		Position0		= 1 << 1,
		Position1		= 1 << 2,
		Normal0			= 1 << 3,
		Normal1			= 1 << 4,
		TexCoord0		= 1 << 5,
		TexCoord1		= 1 << 6,
		Color0			= 1 << 7,
		Color1			= 1 << 8,
		Instancing		= 1 << 9
	};
}

class ISurface
{
public:
	ISurface(IModel* model, uint id, uint resources, uint numVertices, uint numIndices);
	virtual ~ISurface();

	glm::vec3*				vPosition0();
	glm::vec3*				vPosition1();

	glm::vec3*				vNormal0();
	glm::vec3*				vNormal1();

	glm::vec2*				vTexcoord0();
	glm::vec2*				vTexcoord1();

	glm::vec4*				vColor0();
	glm::vec4*				vColor1();

	glm::mat4*				vInstancing();

	uint					GetResources();
	uint					GetNumVertives();
	uint					GetNumIndices();
	ushort*					GetIndices();
	uint					GetSize();
	uchar*					GetVertexData();
	IModel*					GetModel();
	uint					GetId();
	void					SetMemory(uchar* ptn);
	const std::string&		GetName() const;

protected:
	ushort*					m_indices;

	glm::vec3*				m_position0;
	glm::vec3*				m_position1;

	glm::vec3*				m_normal0;
	glm::vec3*				m_normal1;

	glm::vec2*				m_texcoord0;
	glm::vec2*				m_texcoord1;

	glm::vec4*				m_color0;
	glm::vec4*				m_color1;

	glm::mat4*				m_instancing;

	uint					m_resources;
	uint					m_numVertices;
	uint					m_numIndices;
	uchar*					m_vertexdata;
	uint					m_vertexSize;
	uint					m_id;
	IModel*					m_model;
	std::string				m_name;
};

